//
// GProfile.h
//

#if !defined	_GPROFILE_H__
#define			_GPROFILE_H__

#pragma once

class CXMLElement;
#include "Packet/Packet.h"


class CGProfile 
{
// Construction
public:
	CGProfile();
	virtual ~CGProfile();
	
// Attributes
public:
	GGUID			GUID;
protected:
	CXMLElement*	m_pXML;
protected:
	static LPCTSTR	xmlns;

// Operations
public:
	void			Create();
	void			Clear();
	BOOL			IsValid() const;
	CXMLElement*	GetXML(LPCTSTR pszElement = NULL, BOOL bCreate = FALSE);

public:
	BOOL			Load(LPCTSTR pszFile = NULL);
	BOOL			Save(LPCTSTR pszFile = NULL);
	BOOL			FromXML(CXMLElement* pXML);

public:
	CString			GetNick() const;
	CString			GetLocation() const;
	CString			GetContact(LPCTSTR pszType) const;
	DWORD			GetPackedGPS() const;
	
	CString			GetMyAddress();

};

extern CGProfile MyProfile;

#endif 

